<div class="modal-header">
  <button type="button" class="close"  ng-click="dismiss('close')"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  <h3>Change Password</h3>
</div>
<form name="changeForm" role="form" novalidate class="form-horizontal" ng-submit="!changeForm.$invalid  && changePassword(change)">
  <div class="modal-body">
    <div class="row">
      <div class="form-group col-md-10 col-md-push-1">
        <label class="control-label" for="inputPassword">New Password</label>
        <div class="controls">
          <input name="password" type="password" ng-model="change.password" class="form-control" id="inputPassword" ng-minlength="8" required match="change.repeatPassword" auto-focus="true">
          <span style="color:red" ng-show="changeForm.password.$error.required && changeForm.password.$dirty">Required</span>
          <span style="color:red" ng-show="changeForm.password.$dirty && changeForm.password.$error.minlength">Password must be at least 8 characters long</span>
          <span style="color:red" ng-show="changeForm.password.$dirty && ((change.password | passwordPercent).replace('%', '') < 70)"><br/>Password strength must be at least 70% <br/>  &nbsp;&nbsp;(Try having at least 2: UpperCase/LowerCase/Numbers/Symbols)</span>
          <div id="pass-strength" >
            Strength: {{ change.password | passwordPercent }}
          </div>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="form-group col-md-10 col-md-push-1">
        <label class="control-label" for="inputRepeatPassword">Repeat New Password</label>
        <div class="controls">
          <input name="repeatPassword" type="password" ng-model="change.repeatPassword" class="form-control" id="inputRepeatPassword" required match="change.password">
          <span style="color:red" ng-show="changeForm.repeatPassword.$error.required && changeForm.repeatPassword.$dirty">Required</span>
          <span style="color:red" ng-show="change.password != change.repeatPassword">Passwords do not match!</span>
        </div>
      </div>
    </div>
   <div class="row">
    <div class="col-md-9 col-md-push-1 alert alert-info alert-dismissable">
     <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
     <strong>Don't Forget Your Password!</strong><br />
            WARNING: Forgotten passwords are UNRECOVERABLE and can result in LOSS of ALL of your coins!<br />
    </div>
   </div>

  </div>
  <div class="modal-footer">
    <div class="control-group">
      <div class="controls">
        <img ng-show="validating" src="/assets/img/spinner.gif" alt="loading">
        <input type="submit" class="btn" ng-disabled="validating || changeForm.$invalid || ((change.password | passwordPercent).replace('%', '') < 70)" value="Change Password">
        <button type="button" class="btn btn-warning" ng-disabled="loginInProgress" ng-click="dismiss('close')">Cancel</button>
      </div>
    </div>
    <div style="color:red" ng-show="serverError">Uh Oh, There was an problem trying to change your password. Please logout and try again later.</div>
    <div style="color:green" ng-show="validating">We are changing your password and updating your account</div>
  </div>
</form>
